<?php
echo $this->Html->script('delete',FALSE);
echo $this->Html->script('hien_frm',FALSE);
echo $this->Html->script('table_dynamic',FALSE);
?>
<center style='color:red;'><?php echo $this->Session->flash(); ?></center>
<div class="row-fluid ">

    <div class="row-fluid">
        <div class="box paint_hover color_18">
            <div class="title">
                <h4> <span>Cập Nhật Người Dùng<small></small></span> </h4>
            </div>
            <!-- End .title -->
            <div class="content top">
            <form action="" name='xuly' method="post">
                <table id="datatable_example" class="responsive table table-striped table-bordered" style="width:100%;margin-bottom:0; ">

                    <thead>
                    <tr>
                        <th class="no_sort"><label class="checkbox ">
                            <input type="checkbox" name="check" id='checkall' onclick="docheckall()">
                        </label></th>
                        <th class="no_sort">Ảnh Đại Diện</th>
                        <th class="no_sort">Tài Khoản</th>
                        <th class="to_hide_phone ue no_sort">Họ Tên</th>
                        <th class="to_hide_phone ue no_sort">Giới Tính</th>
                        <th class="to_hide_phone ue no_sort">Email</th>
                        <th class="ms no_sort ">Địa Chỉ</th>
                        <th class="ms no_sort ">Hành Động</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach($listuser as $value) { ?>
                    <tr>
                        <td><label class="checkbox">
                            <input type="checkbox" name="chkdanhmuc[]" value="<?php echo $value["User"]["id"];?>">
                        </label></td>
                        <td><img class="thumbnail small" style='max-width:50px; max-height:50px;' src="<?php echo $base_url_img.$value["User"]["img"];?>"></td>
                        <td class="to_hide_phone"><?php echo $value["User"]["username"];?></td>
                        <td class="to_hide_phone"><?php echo $value["User"]["fullname"];?></td>
                        <td class="to_hide_phone"><?php echo ($value['User']['gioitinh']==0)?'Nam':'Nữ';?></td>
                        <td class="to_hide_phone"><?php echo $value["User"]["email"];?></td>
                        <td class="to_hide_phone"><?php echo $value["User"]["diachi"];?></td>
                        <td class="ms"><div class="btn-group"><div class="btn-group">
                        <a class="btn btn-small capnhat" rel="tooltip" data-placement="left" data-original-title=" Sửa " href='<?php echo $base_url.'Users/add_edit/'.$value["User"]["id"];?>'><i class="gicon-edit"></i></a>
                         <a class="btn btn-small" href='<?php echo $base_url;?>nguoi-dung-<?php echo $value["User"]["username"]; ?>-<?php echo $value["User"]["id"]; ?>.html' rel="tooltip" data-placement="top" data-original-title="Chi Tiết"><i class="gicon-eye-open"></i></a>
                          <a class="btn  btn-small xoa" rel="tooltip" data-placement="bottom" data-original-title="Xóa" href='<?php echo $base_url.'Users/delete/'.$value["User"]["id"]; ?>'><i class="gicon-remove "></i></a> </div></td>
                    </tr>
                    <?php } ?>
                    </tbody>
                </table>
                <div class="row-fluid  control-group mt15">

                    <div class="pull-left span6 visible-desktop" action="#">
                        <div class="row-fluid fluid offset8">
                            <button type="button" class="btn btn-inverse inline" onclick="return checkform()">Xóa Mục Đã Chọn</button>
                            <button type="button" href='http://localhost/QLDETHI/Users/add_edit' class="btn btn-inverse inline capnhat">Thêm Mới</button>
                        </div>
                    </div>
                </div>
                </form>
            </div>
            <!-- End row-fluid -->
        </div>
        <!-- End .content -->
    </div>
    <!-- End box -->

</div>
<!-- End .row-fluid -->

